package com.tedu.services;

import com.tedu.mapper.SmbmsAddressMapper;
import com.tedu.mapper.SmbmsRoleMapper;
import com.tedu.pojo.SmbmsRole;
import com.tedu.pojo.SmbmsRoleExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户角色模块
 */
@Service
public class UserRoleServicesImpl implements  UserRoleServices{

    @Autowired
    SmbmsRoleMapper roleMapper;

    @Override
    public List<SmbmsRole> getAllRole() {
        return roleMapper.selectByExample(new SmbmsRoleExample());
    }

    @Override
    public SmbmsRole getRoleById(Integer userrole) {
        return roleMapper.selectByPrimaryKey(new Long(userrole));
    }


}
